package com.biz.primus.ms.member.dao.po.embeddable;

import com.biz.primus.base.enums.ChannelTypes;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 类说明：会员最后一次登录信息
 *
 * @author jun.liu
 */
@Embeddable
@Getter
@Setter
public class MemberLastLoginInfo implements Serializable
{

    /**
     * 登录IP
     */
    @Column(name = "last_login_ip", length = 16)
    private String lastLoginIp;

    /**
     * 登录时间
     */
    @Column
    private LocalDateTime lastLoginDate;

    /**
     * 登录时系统
     */
    @Column(name = "last_login_os", length = 10)
    private String lastLoginOs;

    /**
     * 登录时应用版本
     */
    @Column(name = "last_login_app_version", length = 10)
    private String lastLoginAppVersion;

    /**
     * 纬度
     */
    @Column(columnDefinition = "DECIMAL(9,6)")
    private BigDecimal lastLoginLat;

    /**
     * 经度
     */
    @Column(columnDefinition = "DECIMAL(9,6)")
    private BigDecimal lastLoginLon;

    /**
     * 登录城市id
     */
    @Column
    private Long lastLoginCityId;

    /**
     * 登录渠道
     */
    @Enumerated(EnumType.STRING)
    private ChannelTypes lastLoginChannelType;

}
